<? 
	include('base.php');
	User::protect();
	include_class('shows');
	$page_title = 'View/Edit Shows';
	$section = 'shows';
	include('layout/header.php');
?>

<div id="breadcrumb">
	<a href="index.php">Audition &#62;</a>
	<a href="live.php">Live &#62;</a>
	Shows
</div>

	<h1>shows:</h1>
	<div class="inset">
	<p>
	<?
		$sl = new ShowList();
		$sl->includeAll();
		$sl->toSearch = 'all';
		
		$showlist = $sl->get($_GET['entries_per_page'], $_GET['start']);
		$news_total = $sl->getTotal();
	?>
	<form id="amount_form" action="<?=$PHP_SELF?>" method="get">
		<a href="show_add.php">Add Show</a><span class="padded">|</span>
		<? include('layout/paging.php'); ?>
	</form>
	</p>
	<p>
	<table class="list" border="0" cellspacing="1" cellpadding="0">
	<tr>
		<td class="header">Date/Time</td>
		<td class="header">Venue</td>
		<td class="header">Cost</td>
	</tr>
	<? 
	if (is_array($showlist) && count($showlist) > 0) { 
	foreach ($showlist as $sh) { ?>
		<tr>
			<td valign="top" width="30%"><?=$sh->getDate()?><? if ($sh->getTime()) { ?> - <?=$sh->getTime()?><? } ?></td>
			<td valign="top" width="60%"><a href="show_edit.php?id=<?=$sh->getID()?>"><?=$sh->getName()?></a><? if (!$sh->isActive()) { ?><img src="images/inactive.gif" alt="Entry is Inactive" width="10" height="10" title="Entry is Inactive"><? } ?></td>
			<td valign="top" width="10%"><?=$sh->getCost()?></td>
		</tr>				
		<? }
	} else { ?>
		<tr>
			<td colspan="3">No shows.</td>
		</tr>
	<? } ?>
	</table>
	</p>		
	</div>

<? include('layout/footer.php'); ?>